# $Id$
# Maintainer: Eric Bélanger <eric@archlinux.org>

pkgname=soundtouch
pkgver=2.0.0
pkgrel=1
pkgdesc="An audio processing library"
arch=('i686' 'x86_64')
url="http://www.surina.net/soundtouch/"
license=('LGPL')
depends=('gcc-libs')
source=(http://www.surina.net/soundtouch/${pkgname}-${pkgver}.tar.gz)
sha1sums=('a6829c6b00b8ea684a4998929b1ad05adac449f7')

prepare() {
  cd ${pkgname}
  sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADER/' configure.ac
}

build() {
  cd ${pkgname}
  [ "${CARCH}" = "x86_64" ] && CONFIGFLAG="--with-pic"
  ./bootstrap
  ./configure --prefix=/usr --enable-shared ${CONFIGFLAG}
  make
}

package() {
  cd ${pkgname}
  make DESTDIR="${pkgdir}" pkgdocdir=/usr/share/doc/soundtouch install
}
